package com.sctvcloud.dongqu.ui.adapter.holder;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.sctvcloud.dongqu.R;
import com.sctvcloud.dongqu.beans.ImageInfo;
import com.sctvcloud.dongqu.beans.TopicContent;
import com.sctvcloud.dongqu.beans.TopicListItem;
import com.sctvcloud.dongqu.ui.util.IListShowData;
import com.sctvcloud.dongqu.ui.utils.GlideUtil;
import com.zhy.view.flowlayout.TagAdapter;
import com.zhy.view.flowlayout.TagFlowLayout;

import org.xutils.common.util.LogUtil;

import java.util.Set;

import butterknife.BindView;
import butterknife.ButterKnife;

public class ImgHolder extends BaseRebllionHolder {
    @BindView(R.id.iv_prize)
    protected ImageView iv_prize;
    Context context;


    public ImgHolder(Context context, View itemView) {
        super(context, itemView);
        this.context =context;
    }

    @Override
    public void onDestory() {
        super.onDestory();
    }

    @Override
    protected void initInject() {
        ButterKnife.bind(this, itemView);
    }

    @Override
    public void setData(IListShowData iListShowData, boolean isEditing) {
        super.setData(iListShowData, isEditing);
        if (iListShowData instanceof ImageInfo) {
            ImageInfo item = (ImageInfo) iListShowData;
            GlideUtil.getGlideWithLarge169Def(context, item.getImageUrl()).centerCrop().into(iv_prize);

        }
    }


}
